<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>TurtleDB: ca.uqac.dim.turtledb.Relation Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">TurtleDB
   
   </div>
   <div id="projectbrief">A mini distributed database system</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Packages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pro-methods">Protected Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">ca.uqac.dim.turtledb.Relation Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<!-- doxytag: class="ca::uqac::dim::turtledb::Relation" --><div class="dynheader">
Inheritance diagram for ca.uqac.dim.turtledb.Relation:</div>
<div class="dyncontent">
<div class="center"><img src="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation__inherit__graph.png" border="0" usemap="#ca_8uqac_8dim_8turtledb_8_relation_inherit__map" alt="Inheritance graph"/></div>
<map name="ca_8uqac_8dim_8turtledb_8_relation_inherit__map" id="ca_8uqac_8dim_8turtledb_8_relation_inherit__map">
<area shape="rect" id="node2" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_binary_relation.html" title="ca.uqac.dim.turtledb.BinaryRelation" alt="" coords="245,31,475,57"/><area shape="rect" id="node4" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_n_ary_relation.html" title="ca.uqac.dim.turtledb.NAryRelation" alt="" coords="249,107,471,133"/><area shape="rect" id="node8" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_table.html" title="ca.uqac.dim.turtledb.Table" alt="" coords="272,157,448,184"/><area shape="rect" id="node9" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_unary_relation.html" title="ca.uqac.dim.turtledb.UnaryRelation" alt="" coords="247,233,473,260"/><area shape="rect" id="node3" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_join.html" title="ca.uqac.dim.turtledb.Join" alt="" coords="551,5,719,32"/><area shape="rect" id="node5" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_intersection.html" title="ca.uqac.dim.turtledb.Intersection" alt="" coords="529,56,741,83"/><area shape="rect" id="node6" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_product.html" title="ca.uqac.dim.turtledb.Product" alt="" coords="540,107,729,133"/><area shape="rect" id="node7" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_union.html" title="ca.uqac.dim.turtledb.Union" alt="" coords="545,157,724,184"/><area shape="rect" id="node10" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_projection.html" title="ca.uqac.dim.turtledb.Projection" alt="" coords="533,208,736,235"/><area shape="rect" id="node11" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_selection.html" title="ca.uqac.dim.turtledb.Selection" alt="" coords="535,259,734,285"/><area shape="rect" id="node12" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_variable_table.html" title="ca.uqac.dim.turtledb.VariableTable" alt="" coords="523,309,746,336"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">abstract <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_schema.html">Schema</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html#a7a7af53642133603e51e04d79f938286">getSchema</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">final int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html#a5547b88c42ce6e50c463d9a0e3ef42d0">getDegree</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html#ab6ffd428cfef16a5476b990751f0570b">setStreamingMode</a> (boolean b)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">final <a class="el" href="interfaceca_1_1uqac_1_1dim_1_1turtledb_1_1_relation_iterator.html">RelationIterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html#acd5caf578d0fd8af02e230004dd6a1e7">iterator</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html#ae622e86850cef5b988e17bc199129ebe">toString</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">abstract void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html#adb708409ab8c4a428ed102c4ce850ffe">accept</a> (<a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_query_visitor.html">QueryVisitor</a> v)  throws QueryVisitor.VisitorException</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html#ad9a0a0c06639d3697952669e4c504420">getCardinality</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">abstract int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html#aa39696dd8f39129e2c02e1323c01b124">tupleCount</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html#a19071d0ee56a8c3e2c5374a355cfec4d">contains</a> (<a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_tuple.html">Tuple</a> tup)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">abstract <a class="el" href="interfaceca_1_1uqac_1_1dim_1_1turtledb_1_1_relation_iterator.html">RelationIterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html#ae5ed6d099a1c47cc0aa0026f9b5a4431">streamIterator</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">abstract <a class="el" href="interfaceca_1_1uqac_1_1dim_1_1turtledb_1_1_relation_iterator.html">RelationIterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html#a2ea66dc69ae6dc86627aed815ebd40b6">cacheIterator</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html#a78d7c63efc57aac8604051a03443551c">isFragment</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html#abeb9200b77b041da59550c75aab6fe22">isLeaf</a> ()</td></tr>
<tr><td colspan="2"><h2><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html#a068bf821f5d7d4b51c19c9093a5564d5">m_streamingMode</a> = false</td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html#adec0e5510db4801ec9e230d1d3e938b9">Relation</a> ()</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>A relation is implemented as a map from a set of tuples (the relation's <em>key</em>) to a set of tuples </p>
<dl class="author"><dt><b>Author:</b></dt><dd>sylvain </dd></dl>

<p>Definition at line <a class="el" href="_relation_8java_source.html#l00028">28</a> of file <a class="el" href="_relation_8java_source.html">Relation.java</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="adec0e5510db4801ec9e230d1d3e938b9"></a><!-- doxytag: member="ca::uqac::dim::turtledb::Relation::Relation" ref="adec0e5510db4801ec9e230d1d3e938b9" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html#adec0e5510db4801ec9e230d1d3e938b9">ca.uqac.dim.turtledb.Relation.Relation</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Empty constructor. Should only be called from children's constructors. </p>

<p>Definition at line <a class="el" href="_relation_8java_source.html#l00047">47</a> of file <a class="el" href="_relation_8java_source.html">Relation.java</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="adb708409ab8c4a428ed102c4ce850ffe"></a><!-- doxytag: member="ca::uqac::dim::turtledb::Relation::accept" ref="adb708409ab8c4a428ed102c4ce850ffe" args="(QueryVisitor v)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">abstract void <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html#adb708409ab8c4a428ed102c4ce850ffe">ca.uqac.dim.turtledb.Relation.accept</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_query_visitor.html">QueryVisitor</a>&#160;</td>
          <td class="paramname"><em>v</em></td><td>)</td>
          <td>  throws QueryVisitor.VisitorException<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Implemented in <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_table.html#a45af187301ba83ec19575c957db219d0">ca.uqac.dim.turtledb.Table</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_variable_table.html#a08a3c30245333c35273383f015ef45a7">ca.uqac.dim.turtledb.VariableTable</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_projection.html#af0c6d79d648c715f55c8e24a88fddb43">ca.uqac.dim.turtledb.Projection</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_join.html#ab040c80b2fa39622bc6392a1f7c658de">ca.uqac.dim.turtledb.Join</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_selection.html#aed8c10cdd9d8a2cfea98645d9658ff55">ca.uqac.dim.turtledb.Selection</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_product.html#aa52c72097e9413f0071fa4dc9df9d7db">ca.uqac.dim.turtledb.Product</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_union.html#a6878967d4cf481b22cf0342bf3cdec1b">ca.uqac.dim.turtledb.Union</a>, and <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_intersection.html#a69bea9b9d758d57fe2abace2fd9ab204">ca.uqac.dim.turtledb.Intersection</a>.</p>

</div>
</div>
<a class="anchor" id="a2ea66dc69ae6dc86627aed815ebd40b6"></a><!-- doxytag: member="ca::uqac::dim::turtledb::Relation::cacheIterator" ref="a2ea66dc69ae6dc86627aed815ebd40b6" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">abstract <a class="el" href="interfaceca_1_1uqac_1_1dim_1_1turtledb_1_1_relation_iterator.html">RelationIterator</a> <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html#a2ea66dc69ae6dc86627aed815ebd40b6">ca.uqac.dim.turtledb.Relation.cacheIterator</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns an iterator over tuples of the relation </p>
<dl class="return"><dt><b>Returns:</b></dt><dd></dd></dl>

<p>Implemented in <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_table.html#a5b3c6b4fb85f117600334e229d4075a0">ca.uqac.dim.turtledb.Table</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_variable_table.html#a4289294442a81011eef72a7f176ba0f9">ca.uqac.dim.turtledb.VariableTable</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_join.html#ac86097ea9495ea69c72c17838d4f49f9">ca.uqac.dim.turtledb.Join</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_projection.html#a683984304a172b4a43b1bdd7aa752071">ca.uqac.dim.turtledb.Projection</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_selection.html#acb458f48b8dd24d4e84b2da4ff4b457a">ca.uqac.dim.turtledb.Selection</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_product.html#a61d7f27d36f13e9edc315d32cf48ee67">ca.uqac.dim.turtledb.Product</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_intersection.html#a2f35542d8d81760650d7a7ec2acd4e3b">ca.uqac.dim.turtledb.Intersection</a>, and <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_union.html#a3fdb4a9b8ce9310f87df22db43c123db">ca.uqac.dim.turtledb.Union</a>.</p>

</div>
</div>
<a class="anchor" id="a19071d0ee56a8c3e2c5374a355cfec4d"></a><!-- doxytag: member="ca::uqac::dim::turtledb::Relation::contains" ref="a19071d0ee56a8c3e2c5374a355cfec4d" args="(Tuple tup)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boolean <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html#a19071d0ee56a8c3e2c5374a355cfec4d">ca.uqac.dim.turtledb.Relation.contains</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_tuple.html">Tuple</a>&#160;</td>
          <td class="paramname"><em>tup</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Determines if a relation contains a given tuple. Warning #1: this implementation is inefficient, as it enumerates all tuples until found. Warning #2: using <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html#a19071d0ee56a8c3e2c5374a355cfec4d">contains</a> resets any undergoing enumeration made on the relation. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">tup</td><td>The tuple to look for </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if the tuple is present, false otherwise </dd></dl>

<p>Reimplemented in <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_table.html#a092526a7a8d2c0630d295d0bc7f47c9a">ca.uqac.dim.turtledb.Table</a>.</p>

<p>Definition at line <a class="el" href="_relation_8java_source.html#l00147">147</a> of file <a class="el" href="_relation_8java_source.html">Relation.java</a>.</p>

</div>
</div>
<a class="anchor" id="ad9a0a0c06639d3697952669e4c504420"></a><!-- doxytag: member="ca::uqac::dim::turtledb::Relation::getCardinality" ref="ad9a0a0c06639d3697952669e4c504420" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html#ad9a0a0c06639d3697952669e4c504420">ca.uqac.dim.turtledb.Relation.getCardinality</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Computes the cardinality of a relation. Except for instances of <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_table.html">Table</a> (which actually contain concrete tuples), calling this method will trigger the evaluation of the query tree and the enumeration of all tuples. It should be used sparingly. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of tuples in the relation </dd></dl>

<p>Reimplemented in <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_table.html#a34f929a0250eea5bb1bc7e515840141a">ca.uqac.dim.turtledb.Table</a>.</p>

<p>Definition at line <a class="el" href="_relation_8java_source.html#l00119">119</a> of file <a class="el" href="_relation_8java_source.html">Relation.java</a>.</p>

</div>
</div>
<a class="anchor" id="a5547b88c42ce6e50c463d9a0e3ef42d0"></a><!-- doxytag: member="ca::uqac::dim::turtledb::Relation::getDegree" ref="a5547b88c42ce6e50c463d9a0e3ef42d0" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">final int <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html#a5547b88c42ce6e50c463d9a0e3ef42d0">ca.uqac.dim.turtledb.Relation.getDegree</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>A relation's degree is the size of its schema. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The relation's degree </dd></dl>

<p>Definition at line <a class="el" href="_relation_8java_source.html#l00056">56</a> of file <a class="el" href="_relation_8java_source.html">Relation.java</a>.</p>

</div>
</div>
<a class="anchor" id="a7a7af53642133603e51e04d79f938286"></a><!-- doxytag: member="ca::uqac::dim::turtledb::Relation::getSchema" ref="a7a7af53642133603e51e04d79f938286" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">abstract <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_schema.html">Schema</a> <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html#a7a7af53642133603e51e04d79f938286">ca.uqac.dim.turtledb.Relation.getSchema</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the relation's schema </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The schema </dd></dl>

<p>Implemented in <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_table.html#ad4377b0b6d6bd9b573db9dd3824fd08f">ca.uqac.dim.turtledb.Table</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_variable_table.html#ad16ee9c420649ce783b69f32a1ea2922">ca.uqac.dim.turtledb.VariableTable</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_n_ary_relation.html#a7fa39c21e49765163cdb930d398f0826">ca.uqac.dim.turtledb.NAryRelation</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_join.html#a413b54f905515bae335ad9978fb06127">ca.uqac.dim.turtledb.Join</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_projection.html#a7b72d8d38df297c3a77a13ef2c4491d3">ca.uqac.dim.turtledb.Projection</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_selection.html#aa626189956da84841dc8e2a0ea09b965">ca.uqac.dim.turtledb.Selection</a>, and <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_product.html#a9f04b8b99df3a1c9310740bced83ebb2">ca.uqac.dim.turtledb.Product</a>.</p>

</div>
</div>
<a class="anchor" id="a78d7c63efc57aac8604051a03443551c"></a><!-- doxytag: member="ca::uqac::dim::turtledb::Relation::isFragment" ref="a78d7c63efc57aac8604051a03443551c" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boolean <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html#a78d7c63efc57aac8604051a03443551c">ca.uqac.dim.turtledb.Relation.isFragment</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Determines if the query tree is a fragment. This is the case when the tree's root is a <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_variable_table.html">VariableTable</a>. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if the query tree is a fragment, false otherwise </dd></dl>

<p>Reimplemented in <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_variable_table.html#afd0b10234af37f08de8d13934a5204d5">ca.uqac.dim.turtledb.VariableTable</a>.</p>

<p>Definition at line <a class="el" href="_relation_8java_source.html#l00179">179</a> of file <a class="el" href="_relation_8java_source.html">Relation.java</a>.</p>

</div>
</div>
<a class="anchor" id="abeb9200b77b041da59550c75aab6fe22"></a><!-- doxytag: member="ca::uqac::dim::turtledb::Relation::isLeaf" ref="abeb9200b77b041da59550c75aab6fe22" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boolean <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html#abeb9200b77b041da59550c75aab6fe22">ca.uqac.dim.turtledb.Relation.isLeaf</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Determines if a given operator is at the leaf of the query tree. Only instances of <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_table.html">Table</a> and <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_variable_table.html">VariableTable</a> may be leaves. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd></dd></dl>

<p>Reimplemented in <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_table.html#aa0537277d7f1335610e0e08ca91ca8de">ca.uqac.dim.turtledb.Table</a>, and <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_variable_table.html#a8469b09df3798c91152e353f2e944a48">ca.uqac.dim.turtledb.VariableTable</a>.</p>

<p>Definition at line <a class="el" href="_relation_8java_source.html#l00190">190</a> of file <a class="el" href="_relation_8java_source.html">Relation.java</a>.</p>

</div>
</div>
<a class="anchor" id="acd5caf578d0fd8af02e230004dd6a1e7"></a><!-- doxytag: member="ca::uqac::dim::turtledb::Relation::iterator" ref="acd5caf578d0fd8af02e230004dd6a1e7" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">final <a class="el" href="interfaceca_1_1uqac_1_1dim_1_1turtledb_1_1_relation_iterator.html">RelationIterator</a> <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html#acd5caf578d0fd8af02e230004dd6a1e7">ca.uqac.dim.turtledb.Relation.iterator</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_relation_8java_source.html#l00070">70</a> of file <a class="el" href="_relation_8java_source.html">Relation.java</a>.</p>

</div>
</div>
<a class="anchor" id="ab6ffd428cfef16a5476b990751f0570b"></a><!-- doxytag: member="ca::uqac::dim::turtledb::Relation::setStreamingMode" ref="ab6ffd428cfef16a5476b990751f0570b" args="(boolean b)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html#ab6ffd428cfef16a5476b990751f0570b">ca.uqac.dim.turtledb.Relation.setStreamingMode</a> </td>
          <td>(</td>
          <td class="paramtype">boolean&#160;</td>
          <td class="paramname"><em>b</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Sets the way of querying the relation's tuples </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">b</td><td>True to evaluate in streaming mode, false otherwise </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_relation_8java_source.html#l00065">65</a> of file <a class="el" href="_relation_8java_source.html">Relation.java</a>.</p>

</div>
</div>
<a class="anchor" id="ae5ed6d099a1c47cc0aa0026f9b5a4431"></a><!-- doxytag: member="ca::uqac::dim::turtledb::Relation::streamIterator" ref="ae5ed6d099a1c47cc0aa0026f9b5a4431" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">abstract <a class="el" href="interfaceca_1_1uqac_1_1dim_1_1turtledb_1_1_relation_iterator.html">RelationIterator</a> <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html#ae5ed6d099a1c47cc0aa0026f9b5a4431">ca.uqac.dim.turtledb.Relation.streamIterator</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns an iterator over tuples of the relation </p>
<dl class="return"><dt><b>Returns:</b></dt><dd></dd></dl>

<p>Implemented in <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_table.html#a8616d5a42e073876c16bdb41bd17baa5">ca.uqac.dim.turtledb.Table</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_variable_table.html#aceaf87e8edfb7beb03dc386b4371605f">ca.uqac.dim.turtledb.VariableTable</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_join.html#acc212664b4fd6144baa1f658b349aa8e">ca.uqac.dim.turtledb.Join</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_projection.html#a3a8c6185ea6febcc1b25375b65549982">ca.uqac.dim.turtledb.Projection</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_selection.html#a381bbacfd2b9698c8788309ae5563295">ca.uqac.dim.turtledb.Selection</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_product.html#a94dbff28938f8769bc737a49241259d1">ca.uqac.dim.turtledb.Product</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_intersection.html#abf2659d27a6b03cd3eebf033406c4569">ca.uqac.dim.turtledb.Intersection</a>, and <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_union.html#afb3b1ad311fbe6d366904629bcf57d9e">ca.uqac.dim.turtledb.Union</a>.</p>

</div>
</div>
<a class="anchor" id="ae622e86850cef5b988e17bc199129ebe"></a><!-- doxytag: member="ca::uqac::dim::turtledb::Relation::toString" ref="ae622e86850cef5b988e17bc199129ebe" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">String <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html#ae622e86850cef5b988e17bc199129ebe">ca.uqac.dim.turtledb.Relation.toString</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Pretty-prints a relation to a string </p>

<p>Reimplemented in <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_variable_table.html#ab093371cf0ce65b8ff3d218c0710a7e4">ca.uqac.dim.turtledb.VariableTable</a>.</p>

<p>Definition at line <a class="el" href="_relation_8java_source.html#l00081">81</a> of file <a class="el" href="_relation_8java_source.html">Relation.java</a>.</p>

</div>
</div>
<a class="anchor" id="aa39696dd8f39129e2c02e1323c01b124"></a><!-- doxytag: member="ca::uqac::dim::turtledb::Relation::tupleCount" ref="aa39696dd8f39129e2c02e1323c01b124" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">abstract int <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html#aa39696dd8f39129e2c02e1323c01b124">ca.uqac.dim.turtledb.Relation.tupleCount</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the number of actual tuples present in the query. This number is different from the cardinality of the query; it counts the number of tuples that are present in the leaves of the query tree. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The tuple count </dd></dl>

<p>Implemented in <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_table.html#a615684670db2aebde7f60439f4dd4176">ca.uqac.dim.turtledb.Table</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_variable_table.html#a56041dd84799d1d36bda982d22a0a0f7">ca.uqac.dim.turtledb.VariableTable</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_n_ary_relation.html#a33b44f25873ac1eec96e18bed67e50ab">ca.uqac.dim.turtledb.NAryRelation</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_binary_relation.html#a6d1158d548a8f0eb538871dfdc88826b">ca.uqac.dim.turtledb.BinaryRelation</a>, <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_join.html#a81c2aa3376043f064c8284f36186dc4e">ca.uqac.dim.turtledb.Join</a>, and <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_unary_relation.html#a9caf00de5820f83cef7ae70b2e0314cd">ca.uqac.dim.turtledb.UnaryRelation</a>.</p>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a068bf821f5d7d4b51c19c9093a5564d5"></a><!-- doxytag: member="ca::uqac::dim::turtledb::Relation::m_streamingMode" ref="a068bf821f5d7d4b51c19c9093a5564d5" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boolean <a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html#a068bf821f5d7d4b51c19c9093a5564d5">ca.uqac.dim.turtledb.Relation.m_streamingMode</a> = false</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Whether the enumeration of the relation's tuples is performed in "streaming" mode (vs. "cache" mode) </p>

<p>Definition at line <a class="el" href="_relation_8java_source.html#l00035">35</a> of file <a class="el" href="_relation_8java_source.html">Relation.java</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/ca/uqac/dim/turtledb/<a class="el" href="_relation_8java_source.html">Relation.java</a></li>
</ul>
</div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespaceca.html">ca</a>      </li>
      <li class="navelem"><a class="el" href="namespaceca_1_1uqac.html">uqac</a>      </li>
      <li class="navelem"><a class="el" href="namespaceca_1_1uqac_1_1dim.html">dim</a>      </li>
      <li class="navelem"><a class="el" href="namespaceca_1_1uqac_1_1dim_1_1turtledb.html">turtledb</a>      </li>
      <li class="navelem"><a class="el" href="classca_1_1uqac_1_1dim_1_1turtledb_1_1_relation.html">Relation</a>      </li>

    <li class="footer">Generated on Tue Nov 20 2012 13:26:48 for TurtleDB by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
